#pragma once
#include <common/generic_model.hpp>
#include <model/dto/member/points_reward_item_dto.hpp>

class PointsRewardItemRepository
  : public model::GenericModel<PointsRewardItemDTO, db::points_reward_item> {
  public:
  // CRUD Operations
  static insert_ret_type create(const PointsRewardItemDTO& dto);
  static select_ret_type<PointsRewardItemDTO>
  getByItemName(const std::string& item_name);
  static update_ret_type updateById(const in_id_type id,
                                    const PointsRewardItemDTO& dto);
  static delete_ret_type removeById(const in_id_type id);

  // Custom Queries
  static select_ret_type<PointsRewardItemDTO> getAll();
  static select_ret_type<PointsRewardItemDTO> getByPage(int page_size,
                                                        int offset);
  static count_type count();


  // Foreign Key Relations
};
